<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	    		xmlns:ui="http://java.sun.com/jsf/facelets"
	  			xmlns:h="http://java.sun.com/jsf/html"
	  			xmlns:f="http://java.sun.com/jsf/core"
	  			xmlns:s="http://jboss.com/products/seam/taglib"
				xmlns:a4j="http://richfaces.org/a4j"
				xmlns:rich="http://richfaces.org/rich"
				template="template.xhtml">


<ui:define name="content">
	<div class="entry errors">
		<h:messages globalOnly="true"/>
	</div>
			
	<h:form id="setpassword">
	
		<fieldset>
		
			<s:decorate template="edit.xhtml">
				<ui:define name="label">Password:</ui:define>
				<h:inputSecret id="password" value="#{changePassword.newPwd}" required="true"/>
			</s:decorate>
			
			<s:decorate template="edit.xhtml">
				<ui:define name="label">Verify:</ui:define>
				<h:inputSecret id="newPwdVerify" value="#{changePassword.newPwdVerify}" required="true"/>
			</s:decorate>
			
			<div class="buttonBox">
				<h:commandButton id="change" value="Change" action="#{changePassword.changePassword}"/>
				&#160;
				<s:button id="cancel" value="Cancel" view="/main.xhtml"/>
			</div>
			
		</fieldset>
		
	</h:form>
</ui:define>

<ui:define name="navigation">
	<div id="userpanelLeft">
		<h1>Actions:</h1>
		<div class="userAction">
			<s:link id="chgpwd" view="/changepwd.xhtml" value="change password" propagation="none"/>
			<br />
			<s:link id="chgdata" view="/changeUserData.xhtml" value="change user data" propagation="none"/>
			<br />
			<s:link id="bets" view="/user_panel.xhtml" value="view my bets" propagation="none"/>
		</div>
	</div>
</ui:define>

<ui:define name="extra">
	<div id="userpanel">
		<h1>Account info:</h1>
		<p>login: <span class="accountInfo"> #{user.loginName}</span></p>
		<p>email: <span class="accountInfo">#{user.email}</span></p>
		<p>first name: <span class="accountInfo">#{user.firstName}</span></p>
		<p>last name: <span class="accountInfo">#{user.surname}</span></p>
		<p>last visit: <span class="accountInfo">#{user.lastVisitDate}</span></p>
		<p>balance: <span class="accountInfo">#{user.balance}</span></p>
	</div>
</ui:define>

</ui:composition>